Computer programs may be written to allow different portions (e.g., threads) of the program to be executed concurrently. In order to execute different portions of the program concurrently, the computer system or the program typically includes some mechanism to manage the memory accesses of the different portions to ensure that the parts access common memory locations in the desired order.
Transactional memory systems allow programmers to designate transactions in a program that may be executed as if the transactions are executing in isolation (i.e., independently of other transactions and other sequences of instructions in the program). Transaction memory systems manage the memory accesses of transactions by executing the transactions in such a way that the effects of the transaction may be rolled back or undone if two or more transactions attempt to access the same memory location in a conflicting manner. Transaction memory systems may be implemented using hardware and / or software components.
Transactional memory systems that extend an object-oriented language typically detect conflicts between memory accesses of different transactions at an object granularity. Such systems detect a conflicting access to an object even when different transactions are referencing different fields within the object. Where an array is considered a single object (i.e., an array object), the systems detect concurrent accesses to different elements of an array object a conflict and cause the accesses to be serialized. By serializing accesses to an array object, the system forgoes opportunities for exploiting parallel or concurrent accesses to the array object.